Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

#3178 InfiniteCanvas Heap Corruption - #3228

Merged
michael-hawker merged 3 commits into
CommunityToolkit:masterfrom
deanchalk:InfiniteCanvasIssue
May 26, 2020
Merged

michael-hawker merged 3 commits into
CommunityToolkit:masterfrom
deanchalk:InfiniteCanvasIssue

Conversation

@deanchalk

@deanchalk deanchalk commented Apr 9, 2020 •

Copy link
Copy Markdown

Fixes #3178

PR Type

What kind of change does this PR introduce?

-Bugfix

What is the current behavior?

There was app crashing with extreme panning and zooming when using the InfiniteCanvas

What is the new behavior?

The framework API CanvasComposition.CreateDrawingSession throws an ArgumentException if the drawing rectangle is too big (after zooming, and then attempting to pan/zoom again). There is no way to know what this limit is, and it may be system-specific. The only solution (in my opinion) that gives a reasonable user experience is to silently catch that particular exception during the ReDrraw method.

PR Checklist

Please check if your PR fulfills the following requirements:

  • [ x] Tested code with current supported SDKs
  • Pull Request has been submitted to the documentation repository instructions. Link:
  • Sample in sample app has been added / updated (for bug fixes / features)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Header has been added to all new source files (run build/UpdateHeaders.bat)
  • If new feature, add to Feature List
  • [x ] Contains NO breaking changes

Other information

@ghost

ghost commented Apr 9, 2020

Copy link
Copy Markdown

Thanks deanchalk for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌

@Kyaa-dost Kyaa-dost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deanchalk Thanks for the PR. It is performing as expected with the reasoning provided in the PR description.

@michael-hawker michael-hawker added this to the 6.1 milestone May 18, 2020
@michael-hawker

Copy link
Copy Markdown
Member

Thanks @deanchalk for this PR, sorry it took so long to merge!

Do you think it makes sense to somehow limit the zooming or are we just going to hit this anyway? I guess that's your point where we don't know what the limit is and effectively the user will just see what they saw last, eh?

@michael-hawker
michael-hawker merged commit 6adc62f into CommunityToolkit:master May 26, 2020
@deanchalk

Copy link
Copy Markdown
Author

Thanks @deanchalk for this PR, sorry it took so long to merge!

Do you think it makes sense to somehow limit the zooming or are we just going to hit this anyway? I guess that's your point where we don't know what the limit is and effectively the user will just see what they saw last, eh?

Yup, and unfortunately the limit seems to be arbitrary and built into the underlying framework, and there isnt an API that exposes it, so I think this is the best experience we can give the user

@Kyaa-dost Kyaa-dost added bug 🐛 An unexpected issue that highlights incorrect behavior controls 🎛️ labels Jun 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug 🐛 An unexpected issue that highlights incorrect behavior controls 🎛️

Projects

None yet

Development

Successfully merging this pull request may close these issues.

InfiniteCanvas Heap Corruption

5 participants